<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const res = prompt("input a year", 0);
      if (res > 2024) {
        console.log("年份大了");
      } else if (res < 2024) {
        console.log("年份小了");
      } else {
        console.log("输入正确");
      }
    </script>
  </body>
</html>
